<seed-content class="gray-background">
  <seed-toolbar-header>
    <seed-toolbar-title>完善取票人信息</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>

  <div class="tickets-form">
    <form [formGroup]="ticketsForm">
      <!--姓名-->
      <div class="group seed-underline">
        <em>姓<i style="color:transparent;">苗</i>名</em>
        <div class="content">
          <input type="text" placeholder="请填写真实姓名" formControlName="name"  (blur)="nameCheck()" >
          <p class="error-tip" *ngIf="error.name && !ticketsForm.controls['name'].valid">请输入真实姓名</p>
        </div>
        <!--<i class="clear" *ngIf="ticketsForm.controls['name'].value != ''" (click)="clearValue('name')"></i>-->
      </div>
      <!--手机号-->
      <div class="group seed-underline">
        <em>手机号</em>
        <div class="content">
          <input type="text" placeholder="请输入手机号码" formControlName="phone"  (blur)="phoneCheck()" >
          <p class="error-tip" *ngIf="error.phone && !ticketsForm.controls['phone'].valid" #phone>请输入正确的手机号码</p>
        </div>
        <!--<i class="clear" *ngIf="ticketsForm.controls['phone'].value != ''" (click)="clearValue('phone')"></i>-->
      </div>
      <!--身份证-->
      <div class="group seed-underline">
        <em>身份证号</em>
        <div class="content">
          <input type="text" placeholder="请输入有效身份证号" formControlName="ID"  (blur)="IDCheck()">
          <p class="error-tip" *ngIf="error.ID && !ticketsForm.controls['ID'].valid">请输入有效身份证号</p>
        </div>
          <!--<i class="clear" *ngIf="ticketsForm.controls['ID'].value != ''" (click)="clearValue('ID')"></i>-->
      </div>
      <!--详细地址-->
      <div class="group address-group">
        <em>详细地址</em>
        <div class="content">
          <textarea name="" placeholder="请输入详细地址" formControlName="address"  (blur)="addressCheck()" ></textarea>
          <p class="error-tip" *ngIf="error.address && !ticketsForm.controls['address'].valid" #address>请输入详细的地址</p>
        </div>
      </div>
      <!--取票方式  -->
      <label class="group ticket-bottom" for="select" [ngClass]="{'has-error': error.obtainType && !ticketsForm.controls['obtainType'].valid}">
        <em>取票方式</em>
        <div class="content has-select">
          <select [ngClass]="{'has-change': selectHasChange && ticketsForm.controls['obtainType'].valid }" id="select" formControlName="obtainType"  (ngModelChange)="ticketChange()">
            <option value="" style='display:none;color:#c1c1c1' selected>请选择取票方式</option>
            <option *ngFor="let item of tickets" [ngValue]="item">{{item}}</option>
          </select>
          <p class="error-tip" *ngIf="error.obtainType && !ticketsForm.controls['obtainType'].valid" #obtainType>取票方式不能为空！</p>
        </div>
        <span class="choose" ></span>
      </label>
      <!--提交-->
      <div class="btn-box">
        <button [disabled]="!ticketsForm.valid" (click)="submitForm()">保存</button>
      </div>
    </form>
  </div>
</seed-content>
